

import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改

public class lq502 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int n = scan.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
          arr[i] = scan.nextInt();
        }
        int jg = 0;
        int yx = 0;
        for (int i = 0; i < n; i++) {
          if (arr[i] >= 60) jg++;
          if (arr[i] >= 85) yx++;
        }
        // round()，四舍五入方法
        System.out.println(Math.round((float)jg * 100 / n) + "%");
        System.out.println(Math.round((float)yx * 100 / n) + "%");
        scan.close();
    }
}